package com.lgh.demo.activity;

import android.databinding.DataBindingUtil;
import android.os.Bundle;

import com.lgh.demo.MyApplication;
import com.lgh.demo.R;
import com.lgh.demo.databinding.ActivityMeBinding;
import com.lgh.demo.util.ApiUtils;
import com.lgh.demo.util.Appconfig;
import com.lgh.demo.util.ZXingUtils;

public class MeActivity extends BaseActivity{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityMeBinding activityMeBinding = DataBindingUtil.setContentView(this, R.layout.activity_me);
        if (MyApplication.beanLocationInfo!=null){
            activityMeBinding.setResultBean(MyApplication.beanLocationInfo.getResult());
        }
        activityMeBinding.ivCode.setImageBitmap(ZXingUtils.createQRImage(ApiUtils.getMyUrl(ApiUtils.URL_USERINFO)
                + Appconfig.getKeyNo(MeActivity.this), 500, 500));
    }
}
